
<?php $__env->startSection('web_title','打印血糖'); ?>


<header>
    <link href="<?php echo e(asset('css/easyui.css')); ?>" rel="stylesheet">
    <link href="<?php echo e(asset('static/bootstrap/css/bootstrap.css')); ?>" rel="stylesheet">
    
    <link href="<?php echo e(asset('css/reportPrint.css')); ?>" rel="stylesheet">
    <link href="<?php echo e(asset('css/easyui.css')); ?>" rel="stylesheet">
    <style>
        #suggestPhone,#symptomPhone,#diagnosisPhone,#medicationPhone{
            border:none;
            height: auto;
            display: none;
            min-height: 1rem;
        }
    </style>
</header>




<!--右侧内容-->

<!--操作区域-->

<!--todo 内容区域-->
<div id="reportPrint">
    <div id="PrintCover">
        <img src="<?php echo e(asset('images/printCover.jpg')); ?>" alt="">
    </div>
    <div class="row title_row">
        <div class="title col-md-10 text-center">
            <h2>随糖动态血糖监测报告</h2>
        </div>
        <div class="title col-md-2 text-center">
            <span class="btn btn-default" id="printTrue">打印</span>
        </div>
    </div>
    <div class="row person-message">
        <div class="col-md-12">
            <h3>个人信息</h3>
        </div>
        <div class="col-md-12 margin-top-15" id="userMsg">
            <span>姓名：</span><span class="name first">李洁</span>
            <span>性别：</span><span class="sex">女</span>
        </div>
        <div class="col-md-12 margin-top-15" id="equ_number">
            <span>发射器编号：</span><span class="fs">TH-H028L</span>
            <span style="margin-left: 20px;">传感器编号：</span><span class="cg">1211152</span>
        </div>
    </div>
    <div class="row case-message">
        <div class="col-md-12 margin-top-20">
            <h3>病情信息</h3>
        </div>
        <div class="col-md-12 margin-top-15">
            <span>症状：</span><span class="symptom"></span>
            <textarea rows="10" id="symptom" placeholder="请输入症状"></textarea>
            <textarea rows="10" readonly id="symptomPhone" style="display: none"><?php if(!empty($excel_params->symptom)): ?><?php echo e($excel_params->symptom); ?> <?php endif; ?></textarea>

        </div>
        <div style="clear: both"></div>
        <br>
        <br>
        <div class="col-md-12 margin-top-35">
            <span>诊断：</span><span class="diagnosis"></span>
            <textarea rows="10" id="diagnosis" placeholder="请输入诊断"></textarea>
            <textarea rows="10"  readonly id="diagnosisPhone" style="display: none"><?php if(!empty($excel_params->diagnosis)): ?><?php echo e($excel_params->diagnosis); ?> <?php endif; ?></textarea>
        </div>
        <div style="clear: both"></div>
        <br>
        <br>
        <div class="col-md-12 margin-top-35">
            <span>服用药物：</span><span class="takeMedicine"></span>
            <textarea id="medication" rows="10" placeholder="请输入药物"></textarea>
            <textarea id="medicationPhone" readonly rows="10" style="display: none"><?php if(!empty($excel_params->medication)): ?><?php echo e($excel_params->medication); ?> <?php endif; ?></textarea>


        </div>
    </div>


    <div class="ContinuouslyPic chart">
        <div class="col-md-12 margin-top-80">
            <h3>连续血糖图谱</h3>
        </div>
        <div id="chart2-1a" class="chart2-2 chart2-2a" data-highcharts-chart="3">
            <div id="highcharts-0" style="overflow: visible;width: 100%!important; "></div>
        </div>


    </div>
    <div class="DayPic chart">
        <div class="col-md-12 margin-top-80">
            <h3>日间同比血糖图谱</h3>
        </div>
        <div id="chart2-2b" class="chart2-2 chart2-2b">
            <div id="highcharts-4" style="width: 100%!important;"></div>
        </div>
    </div>
    <div class="referListPic chart">
        <div class="col-md-12 margin-top-80">
            <h3>高低血糖百分比</h3>
        </div>
        <div id="chart2-2c" class="chart2-2 chart2-2c">
            <div id="highcharts-114" style="width: 100%!important;"></div>
        </div>
    </div>
    <div class="DietPic chart">
        <div class="col-md-12 margin-top-80">
            <h3>饮食事件同比图谱</h3>
        </div>
        <div id="chart2-2d" class="chart2-2 chart2-2d">
            <div id="highcharts-120" style="width: 100%!important;"></div>
        </div>
    </div>
    <div class="InsuliPic chart">
        <div class="col-md-12 margin-top-80">
            <h3>胰岛素同比图谱</h3>
        </div>
        <div id="chart2-2e" class="chart2-2 chart2-2e">
            <div id="highcharts-139" style="width: 100%!important;"></div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12 margin-top-20">
            <h3>每日监测报告</h3>
        </div>
        <div class="col-md-12 margin-top-20 table-responsive">
            <table class="table table-bordered" id="daily_table">
            </table>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12 margin-top-20">
            <h3>总体监测报告</h3>
        </div>
        <div class="col-md-12 margin-top-20">
            <table id="AllReportTable" class="table table-bordered">
                <thead>
                <tr>
                    <th>参数类型</th>
                    <th>参数名称</th>
                    <th>结果</th>
                    <th>正常参考值</th>
                </tr>
                </thead>

                <tbody>
                <tr>
                    <th>采集数</th>
                    <td>血糖监测次数</td>
                    <td class="count"></td>
                    <td>-----</td>
                </tr>

                <tr>
                    <th rowspan="5" class="vertical-align-middle">血糖水平</th>
                    <td>平均血糖（MBG）</td>
                    <td class="avg"></td>
                    <td>＜6.6 (mmol/L)</td>
                </tr>

                <tr>
                    <td>高血糖时间占比（≥7.8mmol/L）</td>
                    <td class="gloodMidel"></td>
                    <td>＜17%(4h)</td>
                </tr>

                <tr>
                    <td>低血糖时间占比（≤3.9 mmol/L）</td>
                    <td class="gloodMin"></td>
                    <td>＜12%(3h)</td>
                </tr>

                <tr>
                    <td>最高值</td>
                    <td class="max"></td>
                    <td>11.1（mmol/L）</td>
                </tr>

                <tr>
                    <td>最低值</td>
                    <td class="min"></td>
                    <td>3.9（mmol/L）</td>
                </tr>

                <tr>
                    <th>血糖波动</th>
                    <td>血糖波动系数（血糖水平标准差SDBG）</td>
                    <td class="sdbg"></td>
                    <td>＜1.4</td>
                </tr>

                </tbody>
            </table>
        </div>
    </div>
    <div class="row report-analysis">
        <div class="col-md-12 margin-top-20">
            <h3>图谱及报告分析</h3>
        </div>
        <div class="col-md-12 margin-top-20">
            <p class="Analysis1">1、平均血糖
                <span>6.8mmol/L，高于正常值。                </span>
            </p>
            <p class="Analysis2">2、全天血糖在 <span>
                    0.6-14.3mmol/L，波动幅度较大。                </span>
            </p>
            <p class="Analysis3">3、高血糖时间占比 <span class="high-blood-conclusion">33.3%，高于正常范围</span>, 低血糖时间占比 <span
                        class="low-blood-conclusion">7.0%，正常</span>。</p>
            <p class="Analysis4">4、血糖波动系数 <span>
                    2.3，高于正常值。                </span>
            </p>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12 margin-top-20">
            <h3>医生建议</h3>
        </div>
        <div class="col-md-12 margin-top-20">
            <textarea rows="10" id="suggest" placeholder="请在此处输入医生建议..."></textarea>
            <textarea rows="10" id="suggestPhone" readonly ><?php if(!empty($excel_params->suggest)): ?><?php echo e($excel_params->suggest); ?><?php endif; ?></textarea>
        </div>
    </div>


</div>






<!--cookie的文件引入-->
<script src="<?php echo e(asset('js/jquery.1.12.4.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/jquery.cookie.js')); ?>"></script>

<script src="<?php echo e(asset('js/common_c.js')); ?>"></script>
<script src="<?php echo e(asset('js/echarts.common.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/higtcharts.js')); ?>"></script>
<script src="<?php echo e(asset('js/higtcharts-3D.js')); ?>"></script>
<script src="<?php echo e(asset('js/reportPrint.js')); ?>"></script>


<script>
    $('#side-menu li.caseList').addClass('active');//更改导航列表选中样式   不可删除
    $('#printTrue').click(function () {

        var me = $(this);
        me.css('display', 'none');
        $('textarea').attr('placeholder', '');
        setTimeout(function () {
            me.css('display', 'block');
            $('textarea').attr('placeholder', '请在此处输入医生建议...');
        }, 1000);
        var excel_params = {
            symptom: $("#symptom").val(),
            diagnosis: $("#diagnosis").val(),
            medication: $("#medication").val(),
            suggest: $("#suggest").val()
        };
        var urlData = GetRequest();
        ajax('post', '/manage/addReportInfo', {
                excel_params: excel_params,
                recode_id: "",
                user_id: urlData.user_id,
                excel_url: window.location.href
            }
            , function (data) {
                    if (data.code = 10000) {
                    window.print();
                } else {
                    alert('保存失败，请重新打印！')
                }
            });


    });


    //    alert(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent));
    if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
        $("#printTrue").hide();



        //适配
        var doc = window.document;
        var docEl = doc.documentElement;
        var tid;
        $("html").css({"font-size": "18px"});
        $("body").css({"font-size": "18px"});
        $("#reportPrint").addClass('phoneMeda');

        $("#symptom,#diagnosis,#medication,#suggest").hide();
        $("#symptomPhone,#diagnosisPhone,#medicationPhone,#suggestPhone").show();

        function refreshRem() {
            var width = docEl.getBoundingClientRect().width;


            var rem = width / 3.75 / 10;  //比例按750设计稿 除以7.5 则单位 px/100 为最终结果。
            //比例按750设计稿 除以10 则单位 px/75 为最终结果。
            docEl.style.fontSize = rem + 'px';
        }

        window.addEventListener('resize', function () {
            clearTimeout(tid);
            tid = setTimeout(refreshRem, 300);
        }, false);
        window.addEventListener('pageshow', function (e) {
            if (e.persisted) {
                clearTimeout(tid);
                tid = setTimeout(refreshRem, 300);
            }
        }, false);

        refreshRem();

    }


</script>

